# 代码所有：cxw
# 开发时间：2021/11/10 20:52

filename="text_file/write_file.txt"
with open(filename,"a") as fwrite:
    '''如果要写入的文件不存在，函数openj将会自动创建'''
    #使用"w"时，在每次写入数据时会删除之前写入的内容
    fwrite.write("you can do it!")

file_name="text_file/pi.txt"  #pi.txt不存在，open()自动创建了
with open(file_name,"w") as f_w1:
    f_w1.write("you can do it ,you can change it!\n")
    f_w1.write("yes yes yes \n")



